<!-- templates/login.html -->
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基金管理系统 - 登录</title>
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/login.css') }}" rel="stylesheet">
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <h1>基金管理系统</h1>
            <p class="text-muted">请登录您的账号</p>
        </div>
        
        <form id="loginForm" method="post">
            <div class="form-floating">
                <input type="text" class="form-control" id="username" name="username" placeholder=" " required>
                <label for="username">用户名</label>
            </div>
            
            <div class="form-floating">
                <input type="password" class="form-control" id="password" name="password" placeholder=" " required>
                <label for="password">密码</label>
            </div>
            
            <div class="captcha-container">
                <div class="form-floating flex-grow-1">
                    <input type="text" class="form-control" id="captcha-input" name="captcha" placeholder=" " required>
                    <label for="captcha-input">输入验证码</label>
                </div>
                <img id="captcha-image" src="{{ captcha_url }}" title="点击刷新验证码" alt="验证码" onclick="refreshCaptcha()">
            </div>
            
            <button type="submit" class="btn btn-login">
                <span class="login-text">登录</span>
                <span class="spinner-border spinner-border-sm d-none" role="status"></span>
            </button>
            
            <div class="alert alert-danger" role="alert"></div>
            <div class="alert alert-success" role="alert"></div>
        </form>
    </div>
    <script src="{{ url_for('static', filename='js/jquery-3.7.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/form.js') }}"></script>
</body>
</html>